package com.example.app.appstart

import android.content.Context
import androidx.collection.arrayMapOf
import com.example.app.global.GlobalUserManager
import com.libhttp.HttpManager
import com.rousetime.android_startup.AndroidStartup

/**
 * CreateBy:Joker
 * CreateTime:2023/4/28 14:26
 * description：网络库
 */
class NetStartup : AndroidStartup<String>() {

    override fun callCreateOnMainThread(): Boolean = false

    override fun waitOnMainThread(): Boolean = true

    override fun create(context: Context): String? {
        //网络请求配置初始化
        HttpManager.init {
            arrayMapOf(
                "uid" to GlobalUserManager.getUid(),
            )
        }
        return this.javaClass.name
    }

}